import BaseLayout from '../../layouts/BaseLayout.vue';
import Login from '../../views/login/index.vue';


export default [    
  {
    path: '/',
    redirect: '/workSpace'
  },
  {
    path: '/login',
    component: Login,
    meta: { title: '登录页面' },
  },
  {
    path: '/workspace',
    redirect: '/workspace/index',
    component: BaseLayout,
    meta: { title: '工作空间' },
    children: [
      {
        path: '/workspace/index',
        component: () => import('../../views/workSpace/index.vue'),
        meta: { title: '控制台', requireAuth: true },
      },
    ]
  },{
    path: '/error',
    component: BaseLayout,
    meta: { title: '错误页面' },
    children: [
      {
        path: '/error/401',
        component: () => import('../../views/error/401.vue'),
        meta: { title: '401' },
      },
      {
        path: '/error/403',
        component: () => import('../../views/error/403.vue'),
        meta: { title: '403' },
      },
      {
        path: '/error/404',
        component: () => import('../../views/error/404.vue'),
        meta: { title: '404' },
      },
      {
        path: '/error/500',
        component: () => import('../../views/error/500.vue'),
        meta: { title: '500' },
      }
    ]
  },{
    path: '/system',
    component: BaseLayout,
    meta: { title: '系统管理' },
    children: [
      {
        path: '/system/config',
        component: () => import('../../views/config/index.vue'),
        meta: { title: '系统设置', requireAuth: true },
      },
      {
        path: '/system/attment',
        component: () => import('../../views/attment/index.vue'),
        meta: { title: '上传管理', requireAuth: true },
      },
      {
        path: '/system/cache',
        component: () => import('../../views/cache/index.vue'),
        meta: { title: '缓存管理', requireAuth: true },
      }
    ]
  },{
    path: '/auth',
    component: BaseLayout,
    meta: { title: '列表页面' },
    children: [
      {
        path: '/auth/dept',
        component: () => import('../../views/auth/userdept/index.vue'),
        meta: { title: '部门管理', requireAuth: true },
      },
      {
        path: '/auth/post',
        component: () => import('../../views/auth/userpost/index.vue'),
        meta: { title: '岗位管理', requireAuth: true },
      },
      {
        path: '/auth/user',
        //redirect: '/auth/user/list',
        component: () => import('../../views/auth/user/index.vue'),
        meta: { title: '用户管理', requireAuth: true },
        children: [
          {
            path: '/auth/user/list',
            component: () => import('../../views/auth/user/getlist.vue'),
            meta: { title: '用户列表', requireAuth: true },
          },]
      },
      {
        path: '/auth/user/userchange',
        component: () => import('../../views/auth/user/userchange.vue'),
        meta: { title: '用户信息', requireAuth: true },
      },
      {
        path: '/auth/usergroup',
        component: () => import('../../views/auth/usergroup/index.vue'),
        meta: { title: '角色管理', requireAuth: true },
      }
    ]
  },{
    path: '/systemlog',
    component: BaseLayout,
    meta: { title: '日志管理' },
    children: [
      {
        path: '/systemlog/log',
        component: () => import('../../views/systemlog/log.vue'),
        meta: { title: '数据日志', requireAuth: true },
      },
      {
        path: '/systemlog/logLogin',
        component: () => import('../../views/systemlog/loglogin.vue'),
        meta: { title: '登录日志', requireAuth: true },
      }
    ]
  },{
    path: '/content',
    component: BaseLayout,
    meta: { title: '网站管理' },
    children: [
      {
        path: '/content/category',
        component: () => import('../../views/content/category/index.vue'),
        meta: { title: '内容栏目', requireAuth: true },
      },      
      {
        path: '/content/content',
        component: () => import('../../views/content/content/getlist.vue'),
        meta: { title: '内容管理', requireAuth: true },
      },
      {
        path: '/content/content/addoredit',
        component: () => import('../../views/content/content/addoredit.vue'),
        meta: { title: '添加或者删除内容', requireAuth: true },
      },
    ]
  },{
    path: '/notice',
    component: BaseLayout,
    meta: { title: '消息管理' },
    children: [
      {
        path: '/notice/getlist',
        component: () => import('../../views/notice/getlist.vue'),
        meta: { title: '收到信息', requireAuth: true },
      },      
      {
        path: '/notice/postlist',
        component: () => import('../../views/notice/postlist.vue'),
        meta: { title: '已发信息', requireAuth: true },
      },
      {
        path: '/notice/addoredit',
        component: () => import('../../views/notice/addoredit.vue'),
        meta: { title: '发送信息', requireAuth: true },
      }
    ]
  }
]